#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# listings staged files only
fileList=$(git diff --diff-filter=AM --cached --name-only)

if [ -n "$fileList" ]; then
  echo "Prettifying staged files..."
  npx prettier-compass --write --ignore-unknown $fileList
  git add $fileList
fi
